var User = require("./userModel.js");

/**
 * [del 删除指定数据]
 * @Author   zhanggongze
 * @DateTime 2017-05-26
 * @return   {[type]}    [obj]
 */
function del(){
    var wherestr = {'username' : 'Tracy McGrady'};
    
    User.remove(wherestr, function(err, res){
        if (err) {
            console.log("Error:" + err);
        }
        else {
            console.log("Res:" + res);
        }
    })
}

// del();

function delAll(){
    var wherestr = {};
    
    User.remove(wherestr, function(err, res){
        if (err) {
            console.log("Error:" + err);
        }
        else {
            console.log("Res:" + res);
        }
    })
}

delAll();